import {movieRequest} from "../../api" 
import store from "../store"
//为什么必须要用{}引入
import {GETMOVIELIST} from "../constant/movieConst"

//请求电影数据
export const getMovieAction = ()=>{
    return  async () => {
        //请求API 提到API文件
        const re = await movieRequest()
        store.dispatch({
            type: GETMOVIELIST,
            data: re.data.data.list
        })
    }
}